<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The RarArchive class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.rar-wrapper-cache-stats.html">« rar_wrapper_cache_stats</a></li>
      <li style="float: right;"><a href="rararchive.close.html">RarArchive::close »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.rar.html">Rar</a></li>
    <li>The RarArchive class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.rararchive" class="reference">

 <h1 class="title">The RarArchive class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL rar &gt;= 2.0.0)</p>


  <div class="section" id="rararchive.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    This class represents a RAR archive, which may be formed by several volumes (parts) and which contains
    a number of RAR entries (i.e., files, directories and other special objects such as symbolic links).
   </p>
   <p class="para">
    Objects of this class can be traversed, yielding the entries stored in the respective RAR archive.
    Those entries can also be obtained through <span class="methodname"><a href="rararchive.getentry.html" class="methodname">RarArchive::getEntry()</a></span> and
    <span class="methodname"><a href="rararchive.getentries.html" class="methodname">RarArchive::getEntries()</a></span>.
   </p>
  </div>


  <div class="section" id="rararchive.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">final</span>
      <span class="modifier">class</span> <strong class="classname">RarArchive</strong>
     </span>
     
     <span class="oointerface"><span class="modifier">implements</span> 
       <a href="class.traversable.html" class="interfacename">Traversable</a></span> {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="rararchive.close.html" class="methodname">close</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="rararchive.getcomment.html" class="methodname">getComment</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="rararchive.getentries.html" class="methodname">getEntries</a></span>(): <span class="type"><span class="type">array</span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="rararchive.getentry.html" class="methodname">getEntry</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$entryname</code></span>): <span class="type"><span class="type"><a href="class.rarentry.html" class="type RarEntry">RarEntry</a></span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="rararchive.isbroken.html" class="methodname">isBroken</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="rararchive.issolid.html" class="methodname">isSolid</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="rararchive.open.html" class="methodname">open</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$password</code><span class="initializer"> = NULL</span></span>, <span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$volume_callback</code><span class="initializer"> = NULL</span></span>): <span class="type"><span class="type"><a href="class.rararchive.html" class="type RarArchive">RarArchive</a></span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="rararchive.setallowbroken.html" class="methodname">setAllowBroken</a></span>(<span class="methodparam"><span class="type">bool</span> <code class="parameter">$allow_broken</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="rararchive.tostring.html" class="methodname">__toString</a></span>(): <span class="type">string</span></div>

   }</div>


  </div>

 </div>

 
































































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="rararchive.close.html">RarArchive::close</a> — Close RAR archive and free all resources</li><li><a href="rararchive.getcomment.html">RarArchive::getComment</a> — Get comment text from the RAR archive</li><li><a href="rararchive.getentries.html">RarArchive::getEntries</a> — Get full list of entries from the RAR archive</li><li><a href="rararchive.getentry.html">RarArchive::getEntry</a> — Get entry object from the RAR archive</li><li><a href="rararchive.isbroken.html">RarArchive::isBroken</a> — Test whether an archive is broken (incomplete)</li><li><a href="rararchive.issolid.html">RarArchive::isSolid</a> — Check whether the RAR archive is solid</li><li><a href="rararchive.open.html">RarArchive::open</a> — Open RAR archive</li><li><a href="rararchive.setallowbroken.html">RarArchive::setAllowBroken</a> — Whether opening broken archives is allowed</li><li><a href="rararchive.tostring.html">RarArchive::__toString</a> — Get text representation</li></ul>
</div>
</div></div></body></html>